Computer memory conflict avoidance using page registers

ABSTRACT

Computer memory conflict avoidance using a plurality of page registers coupled individually to a plurality of memory banks is described. An incoming system address request containing a requested memory bank number and a requested page number is received by the memory controller. The page register number corresponding to the requested memory bank is located and the open page address in the located page register is compared to the requested page address. If the requested page number corresponds to the open page address, it is then accessed. If it does not match, the memory page corresponding to the requested page address is closed, the memory page corresponding to the requested page address is opened and then accessed.

This application claims benefit to provisional application No.60/108,930, filed Nov. 16, 1998.

FIELD OF THE INVENTION

The present invention pertains generally to computing systems. Morespecifically, the present invention relates to a providing universalaccess to shared resources in a computing system such as amulti-processor computer systems.

BACKGROUND OF THE INVENTION

In a basic computer system, a central processing unit, or CPU, operatesin accordance with a pre-determined program or set of instructionsstored within an associated memory. In addition to the storedinstruction set or program under which the processor operates, memoryspace, either within the processor memory or in an associated additionalmemory, is provided to facilitate the central processor's manipulationof information during processing. The additional memory provides for thestorage of information created by the processor as well as the storageof information on a temporary, or “scratchpad”, basis which theprocessor uses in order to carry out the program. In addition, theassociated memory provides locations in which output information fromthe processor's operating set of instructions is placed in order to beavailable for the system's output device(s).

In systems in which many components (processors, hard drive, etc) mustshare a common bus in order to access memory there is a high probabilityof memory access conflicts. Especially in the case of multiprocessorcomputer systems, and the like, in which different processors aresimultaneously in operation, access to memory or other shared resourcesbecomes complex. Since it is likely that each of the processors orprocessor systems may require access to the same memory simultaneously,conflicts between processors will generally be unavoidable. Essentially,the operation of two or more processors or processor systemsperiodically results in overlap of the memory commands with respect to acommon memory, or other shared resource, in the multi-processor computersystem.

Conventional approaches to solving the problem of conflicting memoryaccess requests to a shared memory include, in one case, completeredundancy of the memories used for each of the processors, andisolation of the processor systems. However, this approach to solvingthe problem of conflicting memory access requests often defeats theintended advantage of the multiple processor system. Such multipleprocessor systems are most efficient if operated in such a manner as toprovide parallel computing operations upon the same data in which oneprocessor supports the operation of the other. Conventionally, suchprocessor systems may be either time shared in which the processorscompete for access to a shared resource, such as memory, or theprocessor systems may be dual ported in which each processor has its ownmemory bus, for example, where one is queued while the other is givenaccess.

Various approaches have been used to avoid the above described conflictproblems. In one approach, the avoidance of conflicts is accomplished bysequentially operating the processors or by time sharing the processors.In this way, the processors simply “take turns” accessing the sharedresource in order to avoid conflict. Such systems commonly include“passing the ring” or “token systems” in which the potentiallyconflicting processors are simply polled by the system in accordancewith a pre-determined sequences similar to passing a ring about a groupof users.

Unfortunately, use of sequential processor access methodologies imposesa significant limitation upon the operation of the overall computersystem. This limitation arises from the fact that a substantial time isused by the system in polling the competing processors. In addition, inthe case where only a single processor is operating and requires accessto the shared memory, for example, a delay occurs whenever the processoraccesses the shared resource following each memory cycle as the systemsteps through the access sequence.

Another conventional approach to conflict avoidance relies uponestablishing priorities amongst the processors in the computer system.One such arrangement provides every processor assigned to it a priorityof system importance. The memory controller simply provides access tothe highest priority processor every time a conflict occur. For example,in a two processor system, a first and a second processor access ashared memory which is typically a dynamic RAM (DRAM) type memory devicewhich requires periodic refreshing of the memory maintain stored data.Generally, the DRAM type memory is refreshed by a separate independentrefresh system. In such a multi-processor system, both the processorsand the refresh system compete for access to the common memory. A systemmemory controller will process memory access request conflicts, orcommands, as determined by the various priorities assigned to theprocessors and the refresh system. While such systems resolve conflictsand are somewhat more efficient than pure sequential conflict avoidancesystems, they still suffer from lack of flexibility.

Another approach to conflict resolution involves decision-makingcapabilities incorporated in the memory controller. Unfortunately,because the decision making portions of the memory controller areoperated under the control and timing of a clock system, a problemarises in that substantial time is utilized in performing the actualdecision making before the memory controller can grant access to thecommon memory.

Unfortunately, this problem of performing the actual decision makingsubstantially erodes the capability of conventional memory controllersgranting access to multi-bank type memory systems. In multi-bank typememory systems, the actual memory core is departmentalized into specificregions, or banks, in which data to be retrieved is stored. Althoughproviding faster and more efficient memory access, the complexityrequired of conventional memory controllers in coping with a multi-bankmemory device substantially slows the overall access time of the systemas a whole.

In view of the foregoing, it should be apparent that a method ofspeeding up a memory access of a memory page included in a memory bankin a multi-bank type memory by a memory controller is desired.

SUMMARY OF THE INVENTION

According to the present invention, a method of speeding up a memoryaccess of a memory page included in a memory bank in a multi-bank typememory by a memory controller is disclosed. In one embodiment, thememory controller includes a plurality of page registers each of whichis associated with one of the plurality of memory banks, wherein a pageregister associated with a particular bank is arranged to store aparticular bank number, an open page address located within theparticular bank number, and an open page status. The memory controlleralso includes an adjustable comparator unit coupled to each of theplurality of page registers. An incoming system address request isreceived by the memory controller that includes a requested bank numberand a requested page number. A page register corresponding to therequested bank number is then located by the adjustable comparator unitafter which the open page address included in the located page registeris compared to the requested page address. The requested page in thememory bank corresponding to the requested bank number is then accessedwhen the open page address matches the requested page address for therequested memory bank.

A further understanding of the nature and advantages of the presentinvention may be realized by reference to the remaining portions of thespecification and the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings and in whichlike reference numerals refer to similar elements and in which:

FIG. 1A illustrates a broad implementation of a universal controller inaccordance with an embodiment of the invention;

FIG. 1B illustrates a particular implementation of the universalcontroller shown in FIG. 1A;

FIG. 1C shows an address space controller coupled to the universalcontroller is in accordance with an embodiment of the invention;

FIG. 1D illustrates a particular implementation of the address spacecontroller shown in FIG. 1C;

FIG. 1E shows an exemplary request/response ID number in accordance withan embodiment of the invention;

FIG. 2A illustrates a generic universal command in accordance with anembodiment of the invention;

FIG. 2B illustrates a particular universal command of the kind shown inFIG. 2A suitable for requesting memory page read command;

FIG. 2C shows an example of a sequence command formed by providingappropriate timing intervals between the command components of theexemplary command shown in FIG. 2B;

FIG. 3 illustrates a resource tag in accordance with an embodiment ofthe invention;

FIG. 4 shows a flowchart detailing a process for a universal controllerto access a shared resource in accordance with an embodiment of theinvention;

FIG. 5 shows a process whereby the universal controller determines thestate of the resource and the sequence of operations to perform inaccordance with an embodiment of the invention;

FIG. 6 shows a process whereby the universal controller determines theappropriate timing between the sequence of operations based upon aprocess in accordance with an embodiment of the invention;

FIGS. 7a and 7 b shows a page hit/miss controller in accordance with anembodiment of the invention;

FIG. 8 shows a bank access controller in accordance with an embodimentof the invention;

FIG. 9A is an exemplary SLDRAM based multi-processor system inaccordance with an embodiment of the invention;

FIG. 9B is a timing diagram showing an exemplary SLDRAM bus transactionin accordance with the multi-processor system shown in FIG. 9A;

FIG. 10 is a block diagram of a memory controller in accordance with anembodiment of the invention;

FIG. 11 is a block diagram of a restriction block in accordance with anembodiment of the invention;

FIG. 12 is an exemplary SLDRAM command timing diagram in accordance withan embodiment of the invention;

FIGS. 13A-13C are timelines illustrating the reordering of memorycommands according to a specific embodiment of the present invention;

FIG. 14 is a block diagram of a portion of a memory controller designedaccording to a specific embodiment of the invention;

FIG. 15 is a block diagram of reordering circuitry designed according toa specific embodiment of the invention;

FIG. 16 is a more detailed block diagram of the reordering circuitry ofFIG. 15;

FIG. 17 is a diagram of the contents of a command queue elementaccording to a specific embodiment of the invention;

FIG. 18 is a block diagram of a specific embodiment of an addressshifter;

FIG. 19 is a diagram of the contents of a data queue element accordingto a specific embodiment of the invention;

FIG. 20 illustrates a collision detection system that is anotherimplementation of the collision detection system shown in FIG. 15;

FIG. 21 shows an exemplary timing diagram illustrating how everyread/write command to the target device has related to it a data packettransfer;

FIG. 22 illustrates a predictor system having N page timers that storetime between last issued command to the particular page and a predictednext access to that memory; and

FIG. 23 shows a device controller having a device access prioritizer inaccordance with an embodiment of the invention.

FIG. 24 shows a table for that summarizes the scheduling process carriedout by a restriction block in accordance with the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In systems where several devices, such as processors, share a commonresource, various approaches have been used to avoid the conflicts thattypically result when more than one device requires access to the sharedresource. In one approach, the avoidance of conflicts is accomplished bysequentially operating the processors. The processors simply “taketurns” accessing the shared resource in order to avoid conflict. Suchsystems commonly include “passing the ring” or “token systems” in whichthe potentially conflicting processors are simply polled by the systemin accordance with a pre-determined sequence similar to passing a ringabout a group of users.

Unfortunately, these sequential access methodologies generally impose asignificant limitation upon the operation of the overall computer systemsince a substantial amount of time is used in polling the competingprocessors.

Another conventional approach to conflict avoidance relies uponestablishing priorities amongst the processors in the computer system.One such arrangement provides for every processor having assigned to ita priority within a hierarchy of system importance. While such systemsresolve conflicts and are somewhat more efficient than pure sequentialconflict avoidance systems, they still suffer from lack of flexibility.

Another conventional approach to conflict resolution involvesdecision-making logic incorporated into a controller type device.Unfortunately, the complexity of the decision making logic requires thata substantial amount of time be utilized in performing the actualdecision making before the controller can grant access to the sharedmemory.

The problem of complex logic slowing system performance is exacerbatedin as multi-chip module type memory systems having memory dispersedamongst a number of interconnected memory devices each having differentoperating characteristics. Since a conventional logic cannot beconfigured to compensate for each of the different accesscharacteristics inherent in the various memory devices, overall systemperformance is compromised.

Broadly speaking, as shown in FIG. 1A, the invention can be described interms of a system 100 having requesting devices 102 each being coupledto a universal device controller 104 by way of a system bus 106 suitablyconfigured to provide access to any number and type of shared resources108. In one embodiment, the system bus 106 is coupled to the universalcontroller 104 by way of an associated system interface layer 110whereas the universal controller 104, in turn, is coupled to the sharedresource 108 by way of a shared resource interface 109. In broad terms,the universal controller 104 is arranged to determine a state of theshared resource 108 based upon both a shared resource request generatedby any of the requesting devices 102 as well as shared resourceoperational characteristic parameters 113.

In those situations where the requesting system 102 is a processor in amulti-processor system that requires access to the shared resource 108as a memory device 108 that is shared by other of the processors coupledthereto, the universal controller 104 determines a sequence ofoperations to be performed in order to complete the required resourcerequest. When the memory device 108 is, for example, an SDRAM, theoperations typically include a pre-charge, a page close, a page open,and a page read or a page write.

Once the particular sequence of operations has been determined, theuniversal controller 104 determines the appropriate timing between thesequence of operations in order to avoid, for example, data collisionsor other type conflicts. In a preferred embodiment, the timing is based,in part, upon the operating characteristics of the shared memory devicestored in, for example, a look up table. The properly sequenced accesscommand is then issued by the universal controller that is thenresponded to by the shared memory.

In the following detailed description of the present invention, numerousspecific embodiments are set forth in order to provide a thoroughunderstanding of the invention. However, as will be apparent to thoseskilled in the art, the present invention may be practiced without thesespecific details or by using alternate elements or processes. In otherinstances well known processes, procedures, components, and circuitshave not been described in detail so as not to unnecessarily obscureaspects of the present invention.

The invention will now be described in terms of a memory controllerarranged to act as a liaison between a processor and a shared memory. Itshould be noted, however, that the invention can be implemented as auniversal controller capable of controlling access to any resource,shared or not. Such resources do not necessarily have to be a memory, infact, the invention could also be used to control access to a sharedsystem bus such as, for example, providing traffic control in amulti-processor system so as to increase the effective system busbandwidth by reducing bus access latency.

Referring now to FIG. 1B, a system 100 has a requesting device 102, suchas a processor, coupled to a universal controller 104 by way of a systembus 106. The controller 104 is, in turn, coupled to a shared resource108 such as, for example, a memory 108 that can take many forms, such asa DRAM, an SDRAM, an SLDRAM EDO, FPM, RDRAM and the like. In thedescribed embodiment, the system bus 106 includes a uni-directionaladdress bus 106-1 arranged to pass memory address requests generated bythe processor 102 to the universal controller 104. The system bus 106also includes a uni-directional command bus 106-2 which, in conjunctionwith the address bus 106-1, carries a command associated with the memoryaddress. For example, when the processor 102 requires an executableinstruction stored at a particular memory location in the memory 108,the processor outputs a read request (referred to as a system command)to the command bus 106-2 substantially simultaneously with acorresponding memory address request (referred to as a system address)on the address bus 106-1. Both the system address and system command arereceived by a configurable system interface 110 included in thecontroller 104. It should be noted that by configurable, it is meantthat the system interface 110 can be arranged to process the receivedsystem command and address in whatever manner and form is required bythe memory 108. In this way, data required by the processor 102 can bestored in any number and kinds of memory devices coupled to thecontroller 104 without the processor 102 being required to generatecustomized requests for each memory device.

In the described embodiment, the system interface 110 is arranged toconvert the received system command and system address to what isreferred to as a universal command 200, an example of which is shown inFIG. 2A. In one implementation, when the shared resource is a DRAM typememory device (including SLDRAMs, SDRAM, EDO DRAM, etc.) the universalcommand 200 is formed of 5 data fields which encompass all theoperations required in order to perform any memory access of the memory108. Such operations include a pre-charge operation identified by apre-charge data field 202 used to indicate whether or not a particularrow should be pre-charged. Other operations include an activate datafield 204, a read data field 206, a write data field 208, and a refreshdata field 210. If, for example, in the case where the memory 108 has amemory page 1 of memory bank 1 currently active (i.e., open after havingbeen read from or written to), and a subsequent processor command thenrequires that data stored on a page 2 of the memory bank 1 be read andoutput to the processor 102. In this case, in order to carry out therequested command by the processor 102, the page 1 has to be closed(i.e., page 1 is pre-charged), and page 2 has to be activated, and afterthe activation is complete, the page 2 is read. Therefor, the universalcommand 212 shown in FIG. 2B, is generated by the universal commandgenerator 110 having the data fields 202, 204 and 206 set to “1” toindicate “perform the associated operation” while data fields 208 and210 set to “0” indicating “do not perform the associated operation”(i.e., “NOP”).

Referring back to FIG. 1B, since the accessing of the memory 108 isdynamic in nature in that a number of different requesting devices aresharing access to the memory 108, the state of the memory 108 isconstantly changing. By state of the memory, it is meant that in orderto successfully perform a particular operation at a particular memorylocation, the state of that memory location must be known. For example,if a particular memory page is closed, then in order to perform a readoperation, that memory page must be opened. Therefor, in order toascertain the current state of a particular address location, the mostcurrent operation that has been performed on that particular memorylocation is identified with a resource tag 300 as illustrated in FIG. 3.In one embodiment of the invention, the resource tag 300 includes anmemory address field 302 used to identify a particular memory addresslocation, a last issued command field 304 used to identify the lastissued command for the memory address identified in 302 as well as atime of last command data field 306. For example, a resource tag 308 fora memory address ADD₅ indicates that a page read was issued at a time 5N(representative of 5 system clock cycles) where while a resource tag 310indicates that for the same memory address ADD₅ a page write is to beperformed on the memory page at ADD₅ at a time 10N. By tracking thestate of the memory address ADD₅ the universal controller 104 knows thatthe memory page at ADD₅ is already open and a page open operation istherefor not required.

Using the resource state information provided by the tags 300 stored ina resource tag buffer 114, a command sequencer 116 coupled to theconfigurable system interface 110 provides appropriate timing intervalsbetween the command components 202-210 of the universal command 200 toprovide a sequenced command 220 illustrated in FIG. 2C having timingintervals t₁ and t₂ between the command components 202-204 and 204-206,respectively. It should be noted that since there command components 208and 210 are “NOP” type fields, the sequenced command 220 does notinclude any reference to these fields and as such only requires a periodof time substantially equal to clock cycles required for the components202 through 206 plus the period of time substantially equal to t₁+t₂. Inthis way, the command sequencer 116 is able to provide optimal commandand data flow between the processor 102 and the memory 108.

In another embodiment of the invention, when the shared resource 108 isa multi-bank type memory device, such as a SDRAM, or when the sharedresource is a multi-device memory device such as a multi-chip module,the resource tag buffer 114 can store resource tags for all opened pagesin a particular bank or device, for example. In one implementation, acomparator (not shown) detects a bank number or device identifier in thesystem address and compares the page address and the system address withthe contents of the tag buffer 114. In the case where the comparison isnot a “hit”(i.e., addresses don't match), the universal controller 104must close the old page using the address from the tag buffer 114 andopen the new page based upon the new system command.

In those cases where there are a number of different devices beingserviced by the universal controller 104, it would be desirable to beable to select those operating parameters associated only with theparticular device with which the incoming system address is associated.In situations where the universal controller is servicing a number ofdifferent devices, an address space controller 120 coupled to theuniversal controller 104 is shown with reference to FIG. 1C. In thedescribed embodiment, the address space controller 120 provides for thecapability of selecting only those device specific parameters for theone device associated with the incoming system address. In a particularimplementation, shown in FIG. 1D, the address space controller 120includes an adjustable comparator 122 arranged to compare the incomingsystem address to the contents of a region address range buffer 124 thatidentifies which of the devices (or for that matter, memory regions) theincoming address is associated. Once the particular device, or region,is identified, one of a group of device parameter registers 126 and 128(each being coupled to the range buffer 124 and containing the devicespecific parameters for a particular device) is selected. The selecteddevice parameter register then provides the specific operatingparameters associated with the device corresponding to the systemaddress. In some embodiments, the contents of the selected deviceparameter register is input to look-up table LUT 118. In this way, anynumber of different devices can be serviced by the universal controller104 such that each device's particular operating parameters areidentified and used to optimally sequence the corresponding universalcommand.

It should also be noted that in cases when one of the devices coupled tothe universal controller is busy and cannot accept new commands, itwould be advantageous to be able to select any other of the commandswaiting in a command queue. In some embodiments of the invention, everyresponse by the devices and requests by the universal controller have anassociated ID number 150 which in the described embodiment is a dataword of 5 bits in length as illustrated in FIG. 1E. The ID number 150 isconfigured to include a group selector field 152 of 2b its in length anda request number field 153 of 3 bits in length. The group selector (GS)determines to which group the particular system request belongs (i.e.,the processor, for example) while the request number (RN) represents thenumber of requests or responses with the associated group identified bythe group selector field 152 such that consecutive requests from thesame transceiver have consecutive request numbers.

In some embodiments, a group priority selector register 154 includespriority values for each of the response or request groups such that aresponse or request group having a higher priority will supercede thatof a lower priority. In this way, a response or request with a higherpriority can bypass that of a lower priority when the lower priorityrequest or response cannot be processed in the next clock cycle. Inorder to prevent what is referred to as livelock, a livelock counterregister 156 contains information about the number of consecutiverequests (or responses) with the higher priority which can bypassrequests (or responses) with a lower priority. In this way, the lowerpriority request (or response) can not be starved for a substantialnumber of clock cycles.

It should be noted as well that in order to optimize the control of bothcommand and data flow, it is recognized that each shared resource hasassociated with it a set of operating characteristics (such as accesstime, CAS latency in the case of DRAM type devices, for example). Inthose cases where more than one shared resource is serviced by theuniversal controller 104, each of the shared resources has a differentset of operating characteristics which are, in some embodiments, storedin LUT 118 coupled to the command sequencer 116. The command sequencer116 uses the information provided by LUT 118 in conjunction with theresource tags stored in the resource tag buffer 114 to properly sequencethe command components 202-210 to form the sequenced command 220. Thisis especially true in cases where the shared resource is in fact a groupof memory devices, such as a multi-chip module, in which each device canhave substantially different operating characteristics.

Referring now to FIG. 4, a flowchart detailing a process 400 for auniversal controller to access a shared resource in accordance with anembodiment of the invention is shown. The process 400 begins at 402 bythe system generating an access command for the shared resource. Whenthe shared resource is a DRAM based memory device, such operationsinclude pre-charge, refresh, close, open, read, and write. For example,a processor requests a memory page stored in a shared memory bygenerating a system command (i.e., page read) and an associated systemaddress indicating the location in the memory where the requested pageis stored. In a preferred embodiment, the state of the resource isdetermined at 404 using, for example, resource tags associated withactive memory locations in the shared memory. Next, at 406, adetermination is made of a sequence of operations required in order toperform the required request of the shared resource. At 408, theuniversal controller generates a universal command that is based uponthe sequence of operations required to perform the required request. Forexample, in order to perform a page read operation, a previously openpage must be closed, the new page activated, and the read operationperformed, all of which are comprehended in the single universal commandstructure. Once the universal command has be constructed by theuniversal controller, using resource tags and specific operatingcharacteristic data for the shared resource, the universal controllerthen determines the appropriate timing between the various commandcomponents of the universal command at 410. The sequenced command isthen issued at 412, using in some embodiments a physical stage, to theshared resource. Finally, at 414, the shared resource responds to thesequenced command by, for example, providing data stored in the locationindicated by the system address.

In one embodiment of the invention, the universal controller determinesthe state of the resource (402) and the sequence of operations toperform (404) using a process 500 shown in FIG. 5. The process 500begins at 502 by a resource partition identifier (i.e., memory addressregister) being compared to a resource identifier (i.e., resource tagaddress field 202). If, at 504, it is determined that a “hit” hasoccurred (i.e., the address of the new command matches the current tagaddress field), then the next command (data operation) is issued at 506.On the other hand, if the address of the new command does not match thecurrent tag address field (i.e., no hit), then at 508 a determination ismade whether or not the old page is open. If the old page is open, thenthe old page is closed at 510 and the new page is opened at 512. If,however, at 508 the old page is not open, then the new page is opened at512 and in either case, once the new page is opened, the next command(data operation) is issued at 506.

In one embodiment of the invention, the universal controller determinesthe appropriate timing between the sequence of operations (410) basedupon a process 600 shown in FIG. 6. The process 600 begins at 602 by theuniversal controller comparing the first command in the new sequence ofcommands to the last command in the most recent previous sequence ofcommands for a particular resource. At 604, the universal controllerdetermines the physical timing constraints between the universal commandcomponents by comparing the first command component of the new universalcommand with the last command component of the most recent previousuniversal command. In one embodiment, the universal controller uses a 2index LUT in the form of a two dimensional array shown as TABLE 1 wherea first row of the array represents the old (i.e., most recent previous)command and a first column represents the new command. For example,referring to TABLE 1, if the old command was a page read and if the newcommand is a page close, then the intersection of the new command pageclose and the old command page read (i.e., 5N) provides the minimumallowable amount of time (i.e., minimum physical issue time) between thetwo operations. Typically, the information stored in the LUT is providedby the shared resource manufacturer.

TABLE 1 OLD COMMAND page close page open Read Write NEW page close 5NCOMMAND page open Read Write

Once the physical constraints of the resource are determined for aparticular universal command component, a determination is made at 606whether or not there are additional command components included in theuniversal command. If there are no additional command components, thenthe universal command and the associated component timing specificationsare stored at 608. On the other hand, if there are additional commandcomponents included in the universal command, then control is passedback to 604 where the corresponding physical timing constraints for thatcomponent is determined.

However, in order to track a state of the physical pages in the sharedmemory 108 having a number of memory banks, for example, a large numberof resource tags which would require a large amount of cache memorydedicated to the resource tag buffer 114 are needed. This would slow theperformance of the universal controller 104 since it would requiresubstantial amounts of time to retrieve particular resource tags forparticular pages of memory each of which may be located in disparatelocations. Referring to FIG. 7A, in one embodiment, a page hit/misscontroller 702 is included in the universal controller 104 arranged toreduce the number M of page registers 704 to less than the number N ofmemory banks in a multi-bank memory 706 since not every bank has itsrepresentation in the M page registers 704. In operation, each of the Mpage registers 704 stores address and status data of an open page and arandom page register number generator 708 generates a random integralnumber less than or equal to M corresponding to the page register thathas to be replaced by the status of an open page. A comparator 710compares an incoming system address with the bank number and the pageaddress of all the M registers in parallel with four possible results:

1) If the comparator 710 indicates a hit, then the required page of therequested bank is open and ready to access;

2) If the comparator 710 indicates that there is a bank hit and a pagemiss, then the universal controller 104 must close the old page usingthe page address from the page register and open a new page using thepage address from the system address;

3) If the comparator 710 indicates a bank and a page miss, the universalcontroller 104 must close any old page of the bank which number is givenby the random page number generator, open a new page using the systemaddress and finally accessing the requested bank; and

4) bank and page miss, but at least one page register is unused thenthis register will be used and new page will be opened.

In some embodiments, the random number page generator 708 is replaced bya Least Recently Used (LRU) comparator 712 as shown in FIG. 7B whichdetermines which of the M registers 704 has been unused the longestamount of time (i.e., least recently used).

In addition to tracking the states of the physical pages in themulti-bank memory 704, a bank access controller 800 shown in FIG. 8includes N bank registers 802 corresponding to the number of memorybanks N included in the multi-bank memory 704. The bank register 802includes a bank number field 804 that defines an identifying number ofthe bank for which the information in the associated bank is stored. Thebank register 802 also includes a bank status field 806 indicating thestatus of the particular bank identified by the bank number in the banknumber field 804. In a particular embodiment, the bank status field 806can take on values such as those presented in Table 2.

TABLE 2 Bank Register Elements Description Bank Number Identifies bankfor which the information in bank register is stored Bank StatusIndicates status of bank: “00”- invalid entry “01”- the bank countervalue is decreased unit its value reaches 0. If bank counter is greaterthan 0, access to this bank are prohibited. “10”- the bank is closed.“01”- - the bank counter value is decreased until it reaches 0. if bankcounter is greater than 0, then accesses to all banks in the memory areprohibited Bank Timer If bank counter is greater than 0, then theaccesses to memory according to the bank status value are prohibited.

With the development of high speed packet oriented memories such assynchronous link dynamic random access memory (SLDRAM) that deliver busdata rates in the range of 400 to 800 Mb/s/pin, the problems caused bymemory access conflicts are greatly increased. Referring initially toFIG. 9A, an exemplary SLDRAM based multi-processor system 900 inaccordance with an embodiment of the invention is shown. Themulti-processor system 900 includes processors 902 connected to auniversal controller 904 by way of a system bus 906. The universalcontroller 904, in turn, is connected to synchronous link DRAM (SLDRAM)908 and SLDRAM 910 by way of a SLDRAM bus composed of a uni-directionalcommand bus 912 and a bi-directional data bus 914. It should be notedthat even though only two SLDRAMs is shown in FIG. 9A, any number ofSLDRAMs can be connected to the universal controller 904 by way of thebusses 912 and 914. In some cases, the SLDRAMs can take the form of abuffered module that includes any appropriate number of SLDRAMs such as,for this discussion, the SLDRAM 908. An initialization/synchronization(I/S) bus 916 connecting the universal controller 904 to each of theSLDRAMs 908 and 910 provides a signal path for initialization signals aswell as synchronization signals generated by the universal controller904.

In one embodiment of the invention, packetized command, address, andcontrol information from the universal controller 904 are selectivelysent to the SLDRAM 908 and SLDRAM 910 on the command bus 912. The databus 914 is arranged to transmit packetized write data from the universalcontroller 904 to selected ones of the SLDRAM 908 and SLDRAM 910.Alternatively, the data bus 914 is also configured to transmitpacketized read data from selected ones of the SLDRAM 908 and SLDRAM 910back to the universal controller 904. It should be noted that thecommand bus 912 and the data bus 914 typically operate at the same rate,i.e. 400 MB/s/p, 600 MB/s/p, 800 MB/p/s, etc.

A number of control signals generated by the universal controller 904and carried by the command bus 912 include, for example, a differentialfree running clock signal (CCLK), a FLAG signal, a command addresssignal CA, a LISTEN signal, a LINKON signal, and a RESET signal.Typically, packet commands are formed of 4 consecutive 10-bit wordswhere the first word of a command is indicated by a ‘1’ in the first bitof the FLAG signal. In a preferred embodiment, both edges of thedifferential free running clock CCLK are used by the SLDRAM 908 and 910to latch command words. The SLDRAM 908 and 910 respond to the LISTENsignal being HIGH by monitoring the command bus 912 for incomingcommands. Alternatively, the SLDRAM 908 and 910 respond to the LISTENsignal being LOW by entering a power saving standby mode. The LINKONsignal and RESET signals are used to, respectively, shutdown and powerup to a known state selected ones of the SLDRAM 908 and 910, as desired.

For the remainder of this discussion, the SLDRAM 908 only will bediscussed with the full knowledge, however, that any number of SLDRAMscan be connected to the universal controller 904 as deemed appropriate.As discussed above, a typical SLDRAM device, such as the SLDRAM 908, ishierarchically organized by memory banks, columns, rows, and bits aswell as into regions of memory. It is important to note that each ofthese hierarchical levels can in fact be observed to have differentoperational characteristics from one another. Such operationalcharacteristics include, but are not limited to such parameters asmemory access time, chip enable time, data retrieval time etc. It shouldbe noted that the banks within the multi-bank memory will typically havethe same operational characteristics whereas regions are defined to bedifferent devices, such as different memory types or different memorygroups each having different command and data latencies. For example, alocal memory group can be connected directly to the memory controllerand a second, non-local memory group located on a board whereintervening drivers increase command and data latencies with respect tothe local memory group. In other cases, each of the various memory chipsthat go to form a multi-chip module can be considered to be a differentmemory region.

More specifically with reference to the system of FIG. 9A, the SLDRAM908 is a multichip module having 4 memory chips, A, B, C, and D eachcapable of being individually accessed by the command bus 912, the databus 914, and the I/S bus 916. Since each of the memory chips A-D canhave different operational characteristics (typically supplied by themanufacturer), in order to optimally schedule command and data packets,the universal controller 904 is capable of using the operationalcharacteristics of a particular hierarchical level and/or memory regionsaccordingly.

By way of example, FIG. 9B shows a representative timing diagram for anexemplary SLDRAM bus transaction in accordance with the multi-processorsystem 900 shown in FIG. 9. During operation, the processors willtypically generate processor command packets such as, for example, aRead command 950 and a Write command 952 for which the appropriatememory bank(s) of the SLDRAM 908 responds accordingly. Typically, theRead command 950 and the Write command 952 are pipelined on the systembus 906 based upon the particular requirements of the processors 902from which they are generated and not for optimal SLDRAM performance. Asystem clock CLK_(sys) (not shown) provides the necessary timingsignals.

For this example, a processor 902 a generates the Read command 950having a memory address MA₁ located in memory chip A of the SLDRAM 908while a processor 902 b generates a Write command 952 having a memoryaddress MA₂ also located in memory chip A of the SLDRAM 908. In thisexample, the Read command 950 is output to the system bus 906 prior tooutput of the Write command 952. The universal controller 904 receivesthe Read command 950 first and proceeds to process the command basedupon the command itself and the command address MA₁ using destinationaddress specific information stored within the universal controller 904.Once the minimum issue time is determined, the universal controller 904then generates an SLDRAM command packet READ 960 corresponding to thereceived processor command 950 and issues it to the command bus 912.

Generally, the SLDRAM command packet is organized as four 10 bit wordsas illustrated in Table 3 representative of a 64M SLDRAM with 8 banks,1024 row addresses, and 128 column addresses. As shown, there are 3 bitsfor the bank address (BNK), 10 bits for row address (ROW), and 7 bitsfor column address (COL). It should be noted that many otherorganizations and densities are possible and can be accommodated withinthe 40 bit format described as well as any other format as may bedetermined as appropriate. During power up, the universal controller 904organizes the command packet based upon polling of the SLDRAMs for suchfactors as the number of banks, rows, columns, and associated operatingcharacteristics which is then stored by the universal controller 904.

The first word of the command packet contains the chip ID bits. AnSLDRAM will ignore any command that does not match the local ID. Chip IDis assigned by the universal controller 904 on power-up using theinitialization and synchronization signals. In this way, the universalcontroller 904 uniquely addresses each SLDRAM in the multi-processorsystem 900 with resorting to generating separate chip enable signals orglue logic.

TABLE 3 SLDRAM COMMAND PACKET STRUCTURE FLAG CA9 CA8 CA7 CA6 CA5 CA4 CA3CA2 CA1 CA0 1 ID8 ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0 CMD5 0 CMD4 CMD3 CMD2CMD1 CMD0 BNK2 BNK1 BNK0 RW9 RW8 0 ROW7 ROW6 ROW5 ROW4 ROW3 ROW2 ROW1ROW0 0 0 0 0 0 0 COL6 COL5 COL4 COL3 COL2 COL1 COL0

Since the Read command 950 and the Write command 952 are pipelined, theuniversal controller 904 receives Write command 952 (or it could havebeen stored in a buffer) some period of time after receipt of the Readcommand 950 and subsequently issues an SLDRAM command packet WRITE 962corresponding to the Write command 952. The universal controller 904uses MA₂ specific characterization data as well as the issue time (i.e.,the time of issuance) of the READ command 960 to generate a minimumissue time and a data offset for WRITE 962 in order to preventinterference with the previously issued READ command 960 since the samebank (A) is being accessed by both commands.

In this way, the universal controller 904 is capable of dynamicallyscheduling the issuance of SLDRAM command packets based at least uponparticular destination address device operating characteristics as wellas the current state of the command and data packet stream.

Referring now to FIG. 10 illustrating a block diagram of a memorycontroller 1000 in accordance with an embodiment of the invention. Itshould be noted that the memory controller 1000 is but one possibleembodiment of the universal controller 104 shown in FIG. 1 and shouldnot, therefore, be construed as limiting the scope of the invention. Thememory controller 1000 includes a system interface 1002 that connects,by way of the system bus 906, the processors 902 to a memory scheduler1006 (referred to as the scheduler). In one embodiment of the invention,the system interface 1002 is configured to provide for both thetransmission of memory command packets and associated write data packetsgenerated by the processors 902 to the memory command packet scheduler1006. In the situation where the scheduler 1006 indicates that allinternal buffers are full and new commands can not be accommodated, thesystem interface 1002 holds any new commands until such time as thescheduler 1006 indicates it is ready to accept new commands.

A synchronous link media access controller (SLiMAC) 1008 provides aphysical interface between the scheduler 1006 and the SLDRAM 908. Morespecifically, the SLiMAC 1008 includes a command interface 1010 and adata interface 1012 connecting the SLiMAC 1008 to the SLDRAM 908 by wayof the command bus 912 and the data bus 914, respectively. In apreferred embodiment of the invention, the command interface 1010transfers memory commands from the SLiMAC 1008 to the SLDRAM 908accompanied by the associated command clock CCLK. It should be notedthat in some embodiments, the SLiMAC 1008 incorporates a clock doublerwhich uses an interface clock signal ICLK (which is capable of runningat approximately 100 MHz) to generate the command clock signal CCLKwhich typically runs at 200 MHz.

In one embodiment of the invention, the data interface 1012 bothreceives and transmits data on the data bus 914. It should be noted thatthe width of the data bus 914 can be as large as necessary to support asmany SLDRAMs are required. In order to therefore provide the necessarybandwidth, as many data interfaces as needed can be included in theSLiMAC 1008. By way of example, if the data bus 914 is 32 bits wide (16bits per SLDRAM, for example) then the SLiMAC 1008 can include 2 datainterfaces each capable of handling 16 bits associated with a particularSLDRAM. In this way, the size of the data interfaces included in theSLiMAC 1008 can be closely matched to the particular configurations ofthe SLDRAMs connected thereto.

In much the same way as with the command interface 1010, the SLiMAC 1008is capable of providing a data clock signal DCLK that accompanies theread data transferred from the SLDRAM 908 to the SLiMAC 1008. In oneembodiment of the invention, the data clock DCLK is generated by usingthe clock doubler to double the interface clock ICLK frequency fromapproximately 100 MHz to approximately 1000 MHz. It should also be notedthat the interface clock signal ICLK, the command clock signal CCLK, andthe data clock signal DCLK are all phase synchronous.

In a preferred embodiment of the invention, the scheduler 1006 includesa restriction block 1016 arranged to receive system command andassociated system address data from the system interface 1002 connectedthereto. The restriction block 1016 provides SLDRAM command packet dataand associated timing information to a reordering block 1018. A writebuffer 1020 receives write data from the system interface 1002. Asdirected by the scheduler 1006, read data is transferred from the datainterface 1012 through a read buffer 1022 connected to the data bus 914is arranged to provide read data to the system interface 1002. Aninitialization/synchronization (I/S) block 1024 connected to the I/S bus916 provides appropriate initialization and/or synchronization signalsto the SLDRAM 908 as required.

In operation, the scheduler 1006 receives pipelined memory commandpackets generated by the processors 902. Typically, the memory commandpackets are composed of a memory command and associated memory address.In one embodiment of the invention, the scheduler 1006 decodes thememory address associated with the received new command in order todetermine the destination address to which the memory command andassociated data packet (if any) are directed. Once decoded, thescheduler 1006 uses destination address specific device characterizationdata stored therein as well as information associated with a just priorissued memory command to issue a new SLDRAM command packet. The newSLDRAM command packet is output to the command bus 912 and ultimately tothe SLDRAM identified by the CHIP ID included in the SLDRAM commandpacket.

As part of the scheduling process, the scheduler 1006 determines theminimum amount of time after the issuance of the just prior issuedcommand required before the issuance of the new command. Since, asdescribed above, each hierarchical level, such as for example, a memorybank, of a SLDRAM can have different operating characteristics (usuallyprovided by the manufacturer), the scheduler 1006 polls each SLDRAM itservices during initialization. In some embodiments, the memory specificparameters (such as timing) can be written directly into the restrictionblock register 1016 if the connected memory devices do not allow do notallow polling in order to determine operating characteristics. Once theSLDRAMs are polled, the scheduler 1006 stores the device specificinformation which it later uses to develop the appropriate schedulingprotocols. In this way, the scheduler 1006 is capable of adaptivelyproviding scheduling services to any number and type of SLDRAMs withoutresorting to hardwiring or other time consuming and expensiveprocedures.

FIG. 11 is a schematic illustration of a restriction block 1100 inaccordance with and embodiment of the invention. It should be noted thatthe restriction block 1100 is but one possible embodiment of therestriction block 1016 shown in FIG. 10 and as such should not beconstrued as limiting. The restriction block 1100 includes an addressdecoder 1102 connected to the system interface 1002 arranged to decode areceived new address signal associated with a new memory commandgenerated by the processors 902. The decoded new address signal providesan input to a array tag register 1104 in which is stored the status andother relevant information for all, or in some cases only a subset, ofpertinent SLDRAM memory banks. The array tag register 1104 provides aninput to a selector 1106 which passes relevant data for the selectedvirtual bank based upon the decoded new command address to a look uptable (LUT) 1108.

The restriction block 1100 also includes a region comparator 1110 alsoconnected to the system interface 1002 arranged to use the received newaddress signal to provide a region identifier indicative of the regionof memory for which the new command address is located. In this way, therestriction block 1100 is capable of providing a best case schedulingprotocol for the new memory command based at least in part on the memoryregion specific characterization data. The region comparator 1110provides the region identifier to the LUT 1108 as an input along withthe new command signal. The LUT 1108, in turn, provides a minimum deltaissue time and a data offset which is used to convert the new commandand associated new address into an SLDRAM command packet. It should benoted that the minimum delta issue time indicates the delta time (inclock cycles) to issue the new command in relation to the just issuedold command. The data offset time is indicative of the delta time inclock cycles in order to receive a read data packet associated with thenew command after the issuance of the new command.

In one embodiment of the invention, the restriction block 1100 includes16 array tag bank registers and the LUT 1108 is capable of storing fourdifferent parameter sets for four timing regions each, in turn, having16 associated registers.

FIG. 12 is a timing diagram 1200 of a SLDRAM bus signals in response toreceived processor commands in accordance with an embodiment of theinvention. It should be noted that TABLE 4 summarizes the schedulingprocess carried out by the restriction block 1100 by identifying thevarious generated signals. It should also be noted that a memory commandtakes the form of {command, address} where “command” represents theinstruction to be executed and “address” the associated memory location.

Referring now to TABLE 4 and FIG. 12, during a system clock cycle Ø₁, afirst {OPENPAGE, 1000} command is received at the address decoder 302and concurrently at the region comparator 1110. For this example, theaddress decoder 1102 decodes the OPENPAGE command address “1000” as“100” and “400” which the region comparator 1110 determines to beincluded within memory region 0. Since the OPENPAGE command is the firstcommand to be received, there are no “hits” with any of the VirtualBanks B₀−13 and a corresponding replacement counter is set to “0”. Inthe described embodiment, the replacement counter is updated based upona pseudo-random counting scheme whereas in other embodiments randomcounting or other appropriate schemes can be used. Since the first{OPENPAGE, 1000} command is an open type command, there is no associatedminimum delta issue time or data offset, and thus the page at address1000 is opened on the first command clock cycle ØC₁.

During a next system clock cycle Ø₂, a {READ, 1000} command is receivedat the restriction block 1100 which the address decoder 1102 decodes as100 and 400 (i.e.; reading the page opened at memory address location1000 from the previous clock cycle) which again causes the regioncomparator 1110 to set the region identifier to REGION1. In this case,however, the previous, or otherwise referred to as the “old command”having been stored in a B₀ register results in a “hit’ at B₀ whichcauses the selector to output “READ” as the “old command” input to theLUT 1108. Additional inputs include the region indicator REGION1generated by the region comparator 1104 and the “new command” input asREAD. The LUT 1108 utilizes stored characterization data to generate aminimum delta issue time of 3 command clock cycles Ø₃ which indicatesthat at least 3 command clock cycles must separate the issuance of the{PAGEOPEN, 1000} command and the associated {READ, 1000} command.

In this way, each memory command packet received at the restrictionblock 1100 is processed according to the characterization data storedwithin the LUT 1108 and at least in part on the just prior issuedcommand.

The reordering of commands received from the restriction block accordingto a specific embodiment of the invention will now be described. FIGS.13A-13C are timelines 1302 and 1304 which, through a simple commandreordering example, serve to illustrate some of the advantages which maybe realized by reordering memory commands according to a specificembodiment of the present invention. Each timeline shows four readcommands corresponding to two different memory banks. CMD0 and CMD1 areread commands directed to bank 1 of the associated memory. CMD2 and CMD3are read commands directed to bank 2 of the associated memory. Timeline1302 shows memory commands arranged on a command bus connecting a memorycontroller and a memory in the order in which the commands were receivedby the memory controller from the system processor; CMD0 occupies timeslot 0, CMD1 occupies time slot 3, CMD2 occupies time slot 4, and CMD3occupies time slot 7. Each time slot represents one clock cycle.

As discussed above, commands to the same memory bank must have someminimum delay between issuance to accommodate servicing of thepreviously issued command. This is represented in FIG. 13A by the twotime slots between each pair of commands. As can be seen, if the fourread commands are sent to the memory in the order shown in FIG. 13A, thecommand bus will go unused during four available clock cycles, i.e.,times slots 1, 2, 5 and 6. As will be discussed at least some of thisinefficiency may be ameliorated by reordering the command according tothe present invention.

Timelines 1304 and 1306 of FIGS. 13B and 13C, respectively, illustratethe reordering of the commands of FIG. 13A according to a specificembodiment of the invention and at least some of the advantages gainedthereby. In this example, conflicts on the data bus are not consideredfor the sake of simplicity. As discussed below, however, attention mustbe given to such considerations for effective reordering of memorycommands. Due to the fact that CMD2 and CMD3 are directed to a differentmemory bank than CMD0 and CMD1, memory access latencies as between thetwo pairs of commands are irrelevant and may be ignored. That is, thecommands may be rearranged as shown in timeline 1304 to place CMD2 intime slot 1 immediately following CMD0, and CMD3 in time slot 4immediately following CMD1. This is because there does not need to beany delay between the issuance of CMD0 and CMD2 or between the issuanceof CMD1 and CMD3 due to the fact that they are directed to differentbanks of memory. However, as will be understood and as shown in FIG.13C, the minimum delay time, e.g., two clock cycles, between the pairsof commands directed to the same bank must be maintained. That is,reordering of commands may not involve attempts to reduce the delay timebetween successive commands to the same memory bank.

The result of reordering the commands is shown in FIG. 13C in which thefour commands are issued in five clock cycles with only time slot 2going unused. It will be understood, of course, that a fifth memorycommand to yet another memory bank may be inserted in time slot 2 tofurther maximize the efficiency with which the command bus is used.

FIG. 14 is a block diagram of a portion of a memory controller designedaccording to a specific embodiment of the invention. Reorderingcircuitry 1400 receives a sequence of incoming memory commands, i.e., 1,2, 3, from the system processor. According to a specific embodiment, thememory commands are transmitted to reordering circuitry 1400 viarestriction circuitry (not shown) which, as described above, imposesissue time constraints on selected commands relative to other commandsdirected to the same logical bank of the associated memory. The commandsare reordered in command queue 1402 from which the commands are issuedto the memory. In this example, the commands are reordered into thesequence 1, 3, 2.

The original memory command sequence, i.e., 1, 2, 3, is stored in a FIFOmemory 1404 in data-read circuitry 1406. The sequence in FIFO 1404 isused for reordering the data received from the memory to correspond tothe order in which the commands were originally received by the memorycontroller. It should be noted, however, that some of the processorsexpect in-order data while others expect out-of-order data, therefor, byswitching the FIFO 1404 on and off as required, any type data order canbe supported. This is necessary because the processor “expects” toreceive the data in an order corresponding to the order in which itoriginally transmitted the commands to the memory controller.

In addition, because data from the memory may be received by the memorycontroller in a sequence which does not correspond to the originalsequence in which the processor transmits the memory commands, a thirdsequence is stored in data queue 1408. This sequence (in this example 3,1, 2) represents the order in which the data corresponding to thecommand sequence 1, 3, 2, will be received by data-read circuitry 1406.The data queue sequence is computed by reordering circuitry 1400 basedon the command queue sequence and known latencies associated with thevarious logical banks of the memory. When the memory transmits data tothe memory controller in the sequence stored in data queue 1408 (i.e.,3, 1, 2), the data are stored in read-data buffer 1410 and reorderedbased on the information in FIFO 1404 and data queue 1408 such that thedata are transmitted to the processor in an order corresponding to theoriginal command sequence order, i.e., 1, 2, 3.

FIG. 15 is a block diagram of reordering circuitry 1500 in a memorycontroller designed according to a specific embodiment of the invention.Reordering circuitry 1500 includes command queue 1502 which stores andreorders commands received from the system processor. Command queue 1502calculates an issue time for each command, issues the commands, andremoves the issued commands from the queue using command issue timeconstraints associated with commands to the same logical bank in memoryas well as data bus usage constraints.

Data queue 1504 stores data elements representing data occurrence timescorresponding to issued memory commands, calculates new data occurrencetimes for each new entry in the queue, and removes queue entries whenthe corresponding memory transaction is completed.

Comparator matrix 1506 performs a collision detection function in whichthe data occurrence time of a command ready to be issued from commandqueue 1502 (as communicated via multiplexer 1508) is compared to thedata occurrence times of previously issued commands as represented indata queue 1504. If a collision is detected, issuance of the command isdelayed.

FIG. 16 is a more detailed block diagram of reordering circuitry 1500 ofFIG. 15. Command queue 1502 comprises six command queue elements 1602each of which stores 61 bits of information regarding a particularmemory command as illustrated by the diagram of FIG. 17. Command field1702 contains the 40-bit memory command packet which specifies thememory command. Command issue time (C_(d)) field 1704 is a 6-bit fieldwhich indicates a delta time in clock cycles before the command may beissued. The value in field 1704 is determined by the restrictioncircuitry as described above and relates to the most recent memorycommand corresponding to the same logical bank in the memory. That is,the value in the C_(d) field indicates the latency between two commandsto the same bank. The information about the required latencies for eachbank are stored in the restriction circuitry and are determined largelyby the physical characteristics of the memory. Once in the commandqueue, the C_(d) field is decremented once for each clock cycle withsome exceptions. For example, the latency between successive commands tothe same logical bank cannot be changed. Thus, if the C_(d) field for acommand directed to a particular bank reaches zero and is not issued,the C_(d) fields for all other commands to the same bank cannot bedecremented until the first command is issued.

Data occurrence time (D_(d)) field 1706 is a 6-bit field which indicatesa delta time in clock cycles between issuance of a memory command fromthe command queue to transfer of the corresponding data. D_(d) field1706 may not be altered in the command queue. Command ID field 1708 is a5-bit field which uniquely identifies the command in command packet1702. This information is used with corresponding information in theFIFO and the data queue to keep track of which packets are which andwhich data correspond to which packets so that reordering of commandsand data may be effected. Logical bank (B) field 1710 is a 3-bit fieldwhich identifies to which logical bank in the memory the command packetis directed. Finally, burst indicator (D_(b)) field 1712 is a 1-bitfield which indicates whether the data being requested or written occupyone or two clock cycles.

Referring back to FIG. 16, the operation of the command queue iscontrolled by command queue controller 1604. Controller 1604 keeps trackof which command queue elements 1602 are available and controlsinsertion of incoming commands into a particular queue element 1602 viafree position indicator 1606. Controller 1604 also facilitates insertionof command queue element information into data queue 1504 once thecorresponding command has been issued. According to a specificembodiment, commands are inserted into command queue 1502 without regardto the availability of free time slots on the command or data buses.

A command may be issued to the command bus from any one of command queueelements 1602 via multiplexer 1608 if its C_(d) count is zero and thereare no collisions on the data bus indicated. That is, free time slots onthe command bus and/or the data bus must be identified. If a command isnot a read or a write (and therefore requires no data bus resources)only a command bus time slot is needed. If the command is a read or awrite, time slots on both the command and data buses are needed.

Zero comparator 1610 in controller 1604 is used to make the firstdetermination, i.e., whether C_(d)=0. Subtractors 1612 are used tosubtract “1” from the C_(d) count for each command queue element 1602each clock cycle unless there is an exception as described above, i.e.,where C_(d)=0 for a particular command which cannot be issued. In such acase queue controller 1604, using the C_(d) and B fields for all queueelements, generates a mask signal (M) which prevents the C_(d) count forall commands to the same logical bank from being decremented.

According to a specific embodiment, if there are two queue elementshaving C_(d)=0, the one with the highest priority (e.g., the oldest one)is issued. Address shifter 1614 determines the priority of commands inthe queue as will be discussed in greater detail below with reference toFIG. 18. According to another specific embodiment, if a new commandarrives at the command queue with its C_(d) count already at zero, itmay be transferred directly to the memory via multiplexer 1608. A newcommand is stored in a command queue element 1602 if its C_(d) count isnonzero or there are other commands stored in the command queue withC_(d)=0 and higher priority. If, however, the command queue is empty,then a new command can be immediately issued (if C_(d) is equal tozero).

For read or write commands, collisions are detected using the D_(d) andD_(b) fields of the command queue element 1602 containing the commandready to be issued. The occurrence time and duration of the datacorresponding to the command are transmitted to comparator matrix 1506via multiplexer 1508 which is, in turn, controlled by queue controller1604. That is, queue controller 1604 controls multiplexer 1508 totransmit the data occurrence time and duration (either one or two clockcycles) of the queue element for which the command issue time, i.e.,C_(d), is zero. The duration is indicated to be either one or two clockcycles by adding the D_(b) bit to the data occurrence time D_(d) withadders 1616 which yields either a “0” for D_(d+1) (indicating one clockcycle) or a “1” (indicating two clock cycles). The data occurrence timeand duration are then compared in comparator matrix 1506 with the dataoccurrence times and durations of five previously issued commands storedin data queue 1504. According to a specific embodiment, comparatormatrix 1506 comprises a 2*10 parallel comparator matrix.

FIG. 18 is a block diagram of a specific embodiment of address shifter1614 of FIG. 16. As mentioned above, address shifter 1614 determines thepriority of commands. Also as discussed above, new commands are insertedinto any free command queue element 1602 according to free positionindicator 1606. The address of the command queue element 1602 into whicha new command is inserted is inserted into the first free position(A0-A5) with the highest priority. The result is that the A0 position inaddress shifter 1614 stores the queue element address for the oldestcommand which has not already issued. When a command is issued from thecommand queue, the corresponding entry in address shifter 1614 isremoved and the addresses for lower priority commands are shifted intohigher priority positions. As discussed above, when the Cd count for acommand in the command queue reaches zero it may be issued. If, however,there are more than one command for which Cd=0, the oldest one, i.e.,the command with the highest priority as indicated by the position ofits address in address shifter 1614, is issued.

Data queue 1504 of FIG. 16 comprises five queue elements 1652 each ofwhich stores 12 bits of information regarding a previously issued memorycommand as illustrated by the diagram of FIG. 19. Data occurrence time(D_(d)) field 1902 is a 6-bit field which indicates a delta time inclock cycles between issuance of a command from the command queue andreception of the corresponding data. The D_(d) count for each data queueelement 1652 is decremented every clock cycle using one of subtractors1654 until its value reaches zero. When D_(d)=0, the corresponding dataare on the data bus. Therefore, it will be understood that only one dataqueue element 1652 may have D_(d)=0 at any given time. After the D_(d)count reaches zero the information in the corresponding data queueelement is removed from data queue 1504.

Command ID field 1904 is a 5-bit field which uniquely identifies theissued command to which the data correspond. This information is usefulfor reordering the data to correspond to the order in which the commandswere originally transmitted to the memory controller. Finally, burstindicator (D_(b)) field 1906 is a 1-bit field which indicates whetherthe data occupy one or two clock cycles.

Referring back to FIG. 16 and as described above, the data occurrencetime (D_(d)) and duration for each of data queue elements 1652 arecompared in comparator matrix 1506 to the D_(d) and duration for acommand in command queue 1502 which is ready to be issued, i.e., forwhich C_(d)=0. The duration is indicated to be either one or two clockcycles by adding the Db bit to the data occurrence time D_(d) withadders 1656 which yields either a “0” for D_(d+1) (indicating one clockcycle) or a “1” (indicating two clock cycles). If the comparison showsno collisions on the data bus, the command is issued from the commandqueue.

Data queue controller 1658 controls operation of data queue 1504. Freeposition indicator 1660 along with command queue controller 1604facilitates insertion of new data queue element information into dataqueue elements 1652. Free position indicator 1660 also facilitatesremoval of information from data queue elements 1652 when thecorresponding memory accesses are complete. Zero comparator 1662 andburst indicator 1664 are used to determine when D_(d) for any of dataqueue elements 1652 is zero and when the data transfer no longeroccupies the data bus, and thus when the corresponding information maybe removed from the data queue.

According to another specific embodiment of the invention, collisiondetection becomes more complex through the use of a two-dimensionalarray of comparators and multiplexers. This approach is more siliconintensive than the one-dimensional approach described above and looks atall of the elements in the command queue rather than only the one forthe command ready to be issued. It schedules commands not only withrespect to previously issued commands, but also with respect to theorder of data packets on the data bus.

In order to insert a new command, each set of two consecutive stages inthe to-be-issued portion of the command pipe must be compared to see ifa new command can be inserted between them. The comparison actuallydetermines a range that the command can be inserted into. This range isas follows:

CLEN _(x)=command length;

 R _(cstart) =t _(cA) +CLEN _(A); and  (1)

T _(cend) =t _(cb),  (2)

where t_(cA) are t_(cB) are the issue times for consecutive pipelineelements A and B. Pipeline element A is ahead of pipeline element B andthus its issue time is the lower of the two. If there is to be aninsertion there must of course be at least one open slot between the Aand B elements. Thus:

N=T _(cend) −T _(cstart)+1  (3)

(where N=number of issue slots between elements A and B); and

LEN<=t _(cb) −t _(ca) −CLEN _(A)  (4)

In hardware it is easy to simply implement the condition:

(t _(cB) −CLEN _(A))−(t _(cA) +CLEN _(A))=>0  (5)

The start and end points of the range also specify a possible range ofassociated data slots. This range must be compared to each set ofsuccessive elements in the data pipe to see if there is an overlap andwhat the new range will be. Five distinct cases exist for thiscomparison.

Case0

In this case the range described by the data slots t_(dA) and t_(dB) iscompletely outside of the range of the two consecutive elements M and N.In this case then:

 t _(dA) +CLEN _(A) =>t _(dN)  (6)

or, where DLENx=DATA LENGTH,

t _(dB) <=t _(dM) +DLEN _(M)  (7)

There is no possible data slot between the pair M and N.

Case 1

In this case the range described by the data slots t_(dA) and t_(dB) iscompletely within the range of the two consecutive elements M and N. Inthis case then:

t _(dA) +CLEN _(A) =>t _(dM) +DLEN _(M)  (8)

and

t _(dB) −CLEN+DLEN<=t _(dN)(where CLEN is a new command length and DLENis new data length in slots)  (9)

The earliest possible data slot time in this case is t_(dA)+LEN_(A) witha corresponding command issue time of t_(cA)+CLEN_(A)

Case 2

In this case the range described by the data slots tdA and tdB spans theelement M. In this case then:

 t _(dA) +CLEN _(A) <t _(dM) +DLEN _(M)  (10)

and

t _(dB) −CLEN+DLEN>t _(dM) +DLEN _(M) and t _(dB) −CLEN+DLEN<t_(dM)  (11)

The earliest possible data slot time in this case is t_(dM)+DLEN_(M)+1with a corresponding command issue time of t_(dM)+CLEN_(M)−DATA_OFFSETwhere DATA_OFFSET is the time between command issue time and dataoccupancy.

Case 3

In this case the range described by the data slots tdA and tdB spans theelement N. In this case then:

t _(dA) +CLEN _(A) >t _(dM) +DLEN _(M)  (12)

and

t _(dA) +CLEN _(A) +DLEN<t _(dN)  (13)

Thus the earliest possible data slot time in this case ist_(dA)+CLEN_(M) with a corresponding command issue time oft_(cA)+CLEN_(A)+1. It should be noted that the case 1 can also liewithin this case.

Case 4

In this case the range described by the data slots t_(dA) and t_(dB)encapsulates the range defined by the elements M and N. In this casethen:

 t _(dA) +CLEN _(A) <t _(dM) +DLEN _(M)  (14)

and

t _(dB) −LEN>Ct _(dN)  (15)

Thus the earliest possible data slot time in this case ist_(dM)+CLEN_(M) with a corresponding command issue time oft_(cM)+CLEN_(A).+DATA_OFFSET where DATA_OFFSET=t_(dA)−t_(cA).

It is clear that Case 1 and Case 3 are identical for the purpose ofscheduling as the earliest possible slot is always taken. The combinedcase therefore is Case 3. Similarly Case 2 and case 4 are identical asthe desired result is t_(dM)+LEN_(M). In this case it must simply beshown that t_(dM) is spanned by the range given by t_(dA) and t_(dB).Additionally the earliest possible issue time (t_(c)) and data slot(t_(d)) for the incoming command must be considered. The comparisonsthat must be made at each data pipe pair for each command pipe pair are:

if(((t_(cB)−CLEN)=>(t_(cA)+CLEN_(A))) && (t_(c)<=(t_(cA)+CLEN_(A)))){

if(((t_(dA)+CLEN_(A))<=(t_(dM)+DLEN_(M))) &&((t_(dB)−DLEN−(t_(dM)+DLEN_(M)))>=

 0)){

t_(d)=tdM +DLEN_(M);

t_(c)=t_(cA)−t_(dA)+td_(M)+DLEN_(M);

}

else if(((t_(dN)−(t_(dA)+CLEN_(A)+DLEN_(A)))>=0) &&(t_(dA)+CLEN_(A))>=(t_(dM)+DLEN_(M))){

t_(d)=t_(dA)+CLEN_(A);

t_(c)=t_(cA)+CLEN_(A);

}

else {

t_(d)=IMPOSSIBLE;

t_(c)=IMPOSSIBLE;

}

}

else if(((t_(cB)−CLEN)=>t_(c)) && (t_(cA)>(t_(cA)+CLEN_(A)))){

if((t_(d)<(t_(dM)+DLEN_(M))) && ((t_(dB)−DLEN−(t_(dM)+DLEN_(M)))>=0)){

t_(d)=t_(dM)+DLEN_(M);

t_(c)=t_(c)−t_(d)+t_(dM)+DLEN_(M);

}

else if(((t_(dN)−(t_(d)+DLEN))>=0) && t_(d)>=(t_(dM)+DLEN_(M))){

t_(d)=t_(d);

t_(c)=t_(c);

}

else {

t_(d)=IMPOSSIBLE;

t_(c)=IMPOSSIBLE;

}

}

else {

t_(d)=IMPOSSIBLE;

t_(c)=IMPOSSIBLE;

}

Thus for the command pipe the needed operations are:

t_(cB)−CLEN=>t_(cA)+CLEN_(A)

t_(cB)−CLEN=>t_(c)

t_(c)+CLEN<=t_(cB)

t_(c)>t_(cA)+CLEN_(A)

t_(c)<=t_(cA)+CLEN_(A)

While for the data pipe the needed operations are:

t_(dA)+CLEN_(A)<=t_(dM)+DLEN_(M)

t_(dA)+CLEN_(A)>=t_(dM)+DLEN_(M)

t_(dB)−DLEN>=t_(dM)+DLEN_(M)

t_(dN)>=t_(dA)+CLEN_(A)+DLEN_(A)

t_(d)<t_(dM)+DLEN_(M)

t_(dN)>=t_(d)+DLEN

t_(d)>=t_(dM)+DLEN_(M)

The decision logic therefore consists of a matrix of comparator cells asdefined above. The optimum choice is the earliest command issue time andthis is determined by a simple priority encoder.

The reorder pipe control logic must dynamically determine what operationis to be done on each element of the command and data pipes.

In the pending command pipe, each pipe element has 4 possibleoperations, read from previous element (pipe advances), hold currentcontents (pipe holds), read from next element (pipe backs up) and readfrom incoming command bus. A multiple set of conditions may exist atvarious points in the pipe as defined by four cases. The element fromwhich issues are made to the SLiMAC is defined as element 0 while theelement farthest from issue is defined as element M. An insertion to anelement N will be made is the reorder determination logic finds that theoptimum insertion spot in the current pipeline is between elements N−1and N.

Case 1—Hold

The pipe holds as there is no issue to the SLiMAC or insertion of a newcommand.

Case 2—Hold & Insert

In this case there is no issue to the SLiMAC, but there is an insertionof a new command into the pipe. If an insertion occurs at the element N,then the pipe will hold from element 0 to element N−1, insert at elementN and backs up from element N+1 to element M.

Case 3—Issue

In this case there is an issue to the SLiMAC from element 0 and the restof the pipe will advance so that element 0 will contain the contents ofelement 1, element 1 will contain the contents of element 2 and so onuntil element M−1 contains the contents of element M.

Case 4—Issue & Insert

In this case there is an issue to the SLiMAC from element 0 and aninsertion at element N. In this case elements 0 to N−2 are given advanceoperations, element N−1 is given an insert operation while elements N toM will hold. As an advance is given to the element that will store thedata from the element behind it, the insertion at element N (the elementis to be inserted between element N−1 and element N of the current pipe)actually means that the inserted element will end up in position N−1 ofthe updated pipe.

FIG. 20 illustrates a collision detection system 2000 that is anotherimplementation of the collision detection system 1500 shown in FIG. 15.In this embodiment, the collision detection system 2000 reorderscommands to achieve an optimal command sequence based on target responserestrictions and determines the optimal slot for data transfer betweeninitiator controller and target subsystem. Because the reordering of thecommands can not cause collision of the different data packets on thedata bus, a collision detector 2002 that prohibits to the issuance of aparticular command if the command data transfer related to thisparticular command would cause data conflict is required. In thedescribed embodiment, the collision detection system 2000 includes thecollision detector 2002 that is coupled to a command queue 2004.

In the described embodiment, the collision detector 2002 detects allpossible data collisions between a “to be issued” command (that isstored in a command queue 2004) and “already issued” commands (that arestored in a data queue 2006). In the described embodiment, there are Ncommand queues 2004 each being coupled to a multiplexer 2008. Each ofthe N command queues 2004 are arranged to store those commands that areto be issued, a time factor “d_time_(ND)”, indicating when the datatransfer will appear on a data bus between the universal controller andthe target device (i.e., shared resource) after the command was issuedto the target device, a burst-bit (b_(ND)) indicating data bursttransfer, and a read/write bit (rw_(ND)). In the described embodiment,the data queue 2006 stores a time factor “d_time_(D)” indicating whenthe data transfer will appear on the data bus between controller and thetarget device for an already issued request to the target device. Thecommand queue 2006 also stores the burst-bit (b_(ND)) and the read/writebit (rw_(ND)).

In a preferred embodiment, the collision detection system 2000 includesa queues and link controller unit 2010 arranged to store and reorderthose commands that are to be issued. The queues and controller unit2010 also calculates the new issue time of commands and a time when thedata appears on the data bus. The queues and controller unit 2010 alsotransfers the issued element from the command queue into the data queueas well as removing it from the command queue after the command wasissued. The queues and controller unit 2010 also removes data elementsfrom the data queue after the access to the memory has been completed.

Referring to FIG. 21, every read/write command to the target device hasrelated to it a data packet transfer. Before the issue of the command tothe target device the new data packet ND (New Data) is checked accordingto it's timing information to see if it can be inserted into the dataqueue without collision. In this example shown in FIG. 21, an issueddata packet D is already placed in the data queue and a new data packetND is compared against the issued data packet D. It should be noted thatboth the issued data packet D and the new data packet ND represent burstaccesses. In this example, therefore, there are two possibilities howthe new data packet ND can be placed in respect to the issued datapacket D without causing a data collision. The new data packet ND can beplaced on the left side or on the right side of the issued data packetD.

This particular example illustrates collision detection of the memorycontroller that supports both non-burst and burst data transfer (i.e., 4data streams). Due to the bi-directional nature of the data bus, oneclock cycle must be inserted between consecutive read-write orwrite-read transfers.

It should be noted that there are many possible outcomes, some of whichare listed below.

1) There is no collision between D and ND if ND is placed behind orbefore D.

2) Between consecutive read-write or write-read data transfers one clockcycle has to be inserted. Every element of Command and Data Queuesstores a “rw” bit which indicates whether the operation is “read data”(rw=0) or “write data (rw=1).

3) Data packets consist of one data stream (no-burst transfer) or fourstreams (burst transfer). Every element of Command and Data Queuesstores a “burst” bit which indicates whether the operation is “bursttransfer” (burst=1) or “no-burst transfer” (burst=0).

The comparisons that must be made at each to be issued data packet andissued data packet pair for each to be issued command are:

// the initiaiization of variable collision = NO; // the end of the newpackets from Command Queue is determine depends on burst bit if(burst_(ND) = 1) then d_time_end_(ND) = d_time_(ND) + 3 elsed_time_end_(ND) = d_time_(ND) for i=1 to last_element_from_Data_Queuebegin // the end of the packets from Data Queue is determine depends onburst bit if (burst_(D)[i] = 1) then d_time_end_(D)[i]   =d_time_(D)[i] + 3 else d_time_end_(D)[i]   = d_time_(D)[i] // betweentwo consecutive read/write or write/read one clock has to be implementedif (rw_(D)[i] = rw_(ND)) then begin d_time_end_(D)[i]  d_time_end_(D)[i]  + 1 d_time_end_(ND)   = d_time_end_(ND)   + 1 end// collision detection if NOT((d_time_(ND) > d_time_end_(D)[i]) or(d_time_(D)[i] > d_time_end_(ND))) collision = YES; end.

In yet another embodiment of the invention, an apparatus and method forpredicting the time between two consecutive memory accesses is disclosedthat allows for very fast calculation of the earliest “command issuetime” for the new command. Referring to FIG. 22, illustrating apredictor system 2200 having N page timers 2202 that store time betweenlast issued command to the particular page and a predicted next accessto that memory. The next access to the same page can be “close”, “open”,“write” or “read”. The incoming new command (e.g. read) selects oneparticular page timer indicating how long a particular page access hasto wait before the issue. The same new command then selects appropriatecontents of a timing lookup table 2204 which has to be inserted betweenthis command (read) and possible next accesses (close, open, write andread) to the same page. The resolution of timers is one clock cycle.Timing Lookup Table—Data stores time, which indicates how cycles afterthe issue of the command the data on the data bus will be valid. If thenew command is inactive then every cycle the value of all Page Timers isuntil their value reached “0”.

Referring now to FIG. 23, in still another embodiment of the invention,a device controller 2300 having a device access prioritizer 2302 inaccordance with an embodiment of the invention is shown. In thedescribed embodiment, the prioritizer 2302 includes a requests queue2303 suitable for receiving and storing any number of device requestscoupled to a requests controller unit 2304 that is used to, in part,fetch a particular response from any position in the requests queue 2303and transmit the fetched response to an appropriate one of the pluralityof shared devices 108. In the described embodiment, the prioritizer 2302also includes a responds queue 2306 arranged to receive and storeresponses from any of the shared devices 108 coupled to a respondscontroller unit 2308 used to select particular stored responses to bedelivered to the requesting device 102.

In a preferred embodiment, each response and request has associated withit the ID number 150 shown in FIG. 1E such that each request and itsassociated response have the same ID number 150. As discussedpreviously, the ID number 150 includes 5 data bits, wherein the firstand second data bit are the group selector field 152 that identifies thegroup of requesting devices (such as a group of processors in amulti-processor computing environment) to which that particularresponse/request belongs. Again, as discussed above, the request numberfield (RN) 153 represents the number of requests and/or responsesassociated with the group of requesting devices identified by the groupselector field 152 such that consecutive requests from the samerequesting device, for example, have consecutive request number fields153.

During operation, both the requests and responds controllers 2304 and2308, respectively, incorporate the group priority selector register154, the livelock counter register 156, and a reordering selector 2312.The group priority selector register 154 includes priority informationfor a particular requests/response group identified by the RN 152,wherein in one embodiment, a value of “3” represents a highest prioritywhereas a value of “0” represents a lowest priority such that therequest with the higher priority can bypass the request with the lowerpriority.

In order to avoid a livelock situation, the livelock counter register156 contains information about how many consecutive requests (orresponses) with the higher priority can bypass requests (or responses)with the lower priority. It should be noted that the livelock counterregister 156 is active only in those situations where the request withthe higher priority bypasses the request with the lower priority. If, infact, there is no request (or response) with the lower priority in theappropriate queue, then the livelock counter register 156 is inactive.

Although only a few embodiments of the present invention have beendescribed in detail, it should be understood that the present inventionmay be embodied in many other specific forms without departing from thespirit or scope of the invention. Therefore, the present examples are tobe considered as illustrative and not restrictive, and the invention isnot to be limited to the details given herein, but may be modifiedwithin the scope of the appended claims.

What is claimed is:
 1. A method of speeding up memory access to a memorypage in a memory bank in a multi-bank memory by a memory controller,wherein the memory controller includes a plurality of page registerseach of which page registers is associated with one of the memory banksin the multi-bank memory, wherein a page register associated with amemory bank stores a bank number, an open page address located withinthe bank number, and an open page status, and wherein the memorycontroller further includes an adjustable comparator coupled to each ofthe plurality of page registers, the memory banks are comprised ofsynchronous dynamic random access memory and the adjustable comparatoris adjusted based on the operating characteristics of the synchronousdynamic random access memory, the method comprising: receiving anincoming system address request, wherein the incoming system addressrequest includes a requested bank number and a requested page number;locating a page register corresponding to the requested bank numberusing the adjustable comparator; comparing the page address stored inthe located page register to the requested page address; accessing therequested page in the memory bank corresponding to the requested banknumber when the stored page address matches the requested page addressfor the requested memory bank; closing the memory page corresponding tothe stored page address when the stored page address does not match therequested page address for the requested memory bank; opening the memorypage corresponding to the requested page address; and accessing therequested memory page.
 2. A method as recited in claim 1, wherein theoperating characteristics are stored in an address space controllercoupled to the memory controller.
 3. A method as recited in claim 2,wherein when the memory bank is determined, the operatingcharacteristics of the synchronous dynamic random access memory thatcomprises the memory bank is used to configure the adjustablecomparator.